<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>憨憨的聊天室</title>
</head>
<body>
    <form>
        <div>
            <h2>服务器返回的消息:</h2>
            <p id="retmsg"></p>
        </div>
        <div>
            <input type="text" id="msg">
        </div>
        <p>
            <button>发送</button>
        </p>
    </form>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script>

    $("button").click(function() {
        let msg = $("#msg").val();
        let ipAddr = "http://10.21.8.206/abc"
        $.get(ipAddr,{msg:msg},function(res) {
            $("#retmsg").html(res)
        })

    })
</script>
</html>